package com.adou.d16.bio;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.Reader;

public class BRTest2 {
    public static void main(String[] args) {
        try (
                // 1.创建字符流和源文件接通
                Reader fr = new FileReader("d1-helloword-app\\src\\it05.txt");

                final BufferedReader br = new BufferedReader(fr)

        ) {
//            // 3.每次读取多个字符
//            char[] buffer = new char[3];
//            int len;
//            while((len = br.read(buffer)) != -1) {
//                System.out.print(new String(buffer, 0, len));
//            }

            String line;
            while((line = br.readLine()) != null) {
                System.out.print(line);
            }


        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
